function judge1 (obj) {
    console.log("judge1", Object.keys(obj).length === 0);
    // return Object.keys(obj).length === 0
}

function judge2 (obj) {
    console.log("judge2", JSON.stringify(obj) === "{}");
}

function judge3 (obj) {
    console.log("judge3", Object.getOwnPropertyNames(obj).length === 0);
}

// 或者添加判断Object.getOwnPropertySymbols(obj)

function judgeObj (obj) {
    console.log("judgeObj", Reflect.ownKeys(obj).length === 0);
}



judge1({ [Symbol('a')]: 1 })
judge2({ [Symbol('a')]: 1 })
judge3({ [Symbol('a')]: 1 })
judgeObj({ [Symbol('a')]: 1 })